from google.protobuf.internal import containers as _containers
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union

DESCRIPTOR: _descriptor.FileDescriptor

class ConnectedMessage(_message.Message):
    __slots__ = ["service_id", "user_id"]
    SERVICE_ID_FIELD_NUMBER: _ClassVar[int]
    USER_ID_FIELD_NUMBER: _ClassVar[int]
    service_id: int
    user_id: int
    def __init__(self, user_id: _Optional[int] = ..., service_id: _Optional[int] = ...) -> None: ...

class ObserverInfo(_message.Message):
    __slots__ = ["channel", "ipAddress", "port"]
    class Channel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ALL: ObserverInfo.Channel
    CHANNEL_FIELD_NUMBER: _ClassVar[int]
    IPADDRESS_FIELD_NUMBER: _ClassVar[int]
    PORT_FIELD_NUMBER: _ClassVar[int]
    Service: ObserverInfo.Channel
    User: ObserverInfo.Channel
    channel: ObserverInfo.Channel
    ipAddress: str
    port: int
    def __init__(self, channel: _Optional[_Union[ObserverInfo.Channel, str]] = ..., ipAddress: _Optional[str] = ..., port: _Optional[int] = ...) -> None: ...

class Ping(_message.Message):
    __slots__ = ["server_id", "stamp"]
    SERVER_ID_FIELD_NUMBER: _ClassVar[int]
    STAMP_FIELD_NUMBER: _ClassVar[int]
    server_id: int
    stamp: int
    def __init__(self, server_id: _Optional[int] = ..., stamp: _Optional[int] = ...) -> None: ...

class QueryRequest(_message.Message):
    __slots__ = ["serviceName"]
    SERVICENAME_FIELD_NUMBER: _ClassVar[int]
    serviceName: str
    def __init__(self, serviceName: _Optional[str] = ...) -> None: ...

class QueryResponse(_message.Message):
    __slots__ = ["status"]
    class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ERROR: QueryResponse.Status
    STATUS_FIELD_NUMBER: _ClassVar[int]
    SUCCESS: QueryResponse.Status
    status: QueryResponse.Status
    def __init__(self, status: _Optional[_Union[QueryResponse.Status, str]] = ...) -> None: ...

class RegisterInfo(_message.Message):
    __slots__ = ["service", "serviceName"]
    SERVICENAME_FIELD_NUMBER: _ClassVar[int]
    SERVICE_FIELD_NUMBER: _ClassVar[int]
    service: Service
    serviceName: str
    def __init__(self, serviceName: _Optional[str] = ..., service: _Optional[_Union[Service, _Mapping]] = ...) -> None: ...

class Response(_message.Message):
    __slots__ = ["error_code", "message", "server_id", "status", "user_id"]
    class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ERROR: Response.Status
    ERROR_CODE_FIELD_NUMBER: _ClassVar[int]
    MESSAGE_FIELD_NUMBER: _ClassVar[int]
    OK: Response.Status
    SERVER_ID_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    USER_ID_FIELD_NUMBER: _ClassVar[int]
    error_code: int
    message: str
    server_id: int
    status: Response.Status
    user_id: int
    def __init__(self, status: _Optional[_Union[Response.Status, str]] = ..., server_id: _Optional[int] = ..., user_id: _Optional[int] = ..., error_code: _Optional[int] = ..., message: _Optional[str] = ...) -> None: ...

class Service(_message.Message):
    __slots__ = ["ipAddress", "port", "rank", "status"]
    class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ERROR: Service.Status
    IPADDRESS_FIELD_NUMBER: _ClassVar[int]
    OK: Service.Status
    PORT_FIELD_NUMBER: _ClassVar[int]
    RANK_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    UNKNOWN: Service.Status
    ipAddress: str
    port: int
    rank: int
    status: Service.Status
    def __init__(self, status: _Optional[_Union[Service.Status, str]] = ..., ipAddress: _Optional[str] = ..., port: _Optional[int] = ..., rank: _Optional[int] = ...) -> None: ...

class ServiceResponse(_message.Message):
    __slots__ = ["id", "ipAddress", "port"]
    ID_FIELD_NUMBER: _ClassVar[int]
    IPADDRESS_FIELD_NUMBER: _ClassVar[int]
    PORT_FIELD_NUMBER: _ClassVar[int]
    id: int
    ipAddress: str
    port: int
    def __init__(self, ipAddress: _Optional[str] = ..., port: _Optional[int] = ..., id: _Optional[int] = ...) -> None: ...

class ServiceStatusInfo(_message.Message):
    __slots__ = ["named", "serverId", "status"]
    class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ERROR: ServiceStatusInfo.Status
    NAMED_FIELD_NUMBER: _ClassVar[int]
    OK: ServiceStatusInfo.Status
    SERVERID_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    UNKNOWN: ServiceStatusInfo.Status
    named: str
    serverId: int
    status: ServiceStatusInfo.Status
    def __init__(self, status: _Optional[_Union[ServiceStatusInfo.Status, str]] = ..., named: _Optional[str] = ..., serverId: _Optional[int] = ...) -> None: ...

class ServicesDetail(_message.Message):
    __slots__ = ["id", "ipAddress", "named", "port", "rank", "status", "type"]
    class Status(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    ERROR: ServicesDetail.Status
    ID_FIELD_NUMBER: _ClassVar[int]
    IPADDRESS_FIELD_NUMBER: _ClassVar[int]
    NAMED_FIELD_NUMBER: _ClassVar[int]
    OK: ServicesDetail.Status
    PORT_FIELD_NUMBER: _ClassVar[int]
    RANK_FIELD_NUMBER: _ClassVar[int]
    STATUS_FIELD_NUMBER: _ClassVar[int]
    TYPE_FIELD_NUMBER: _ClassVar[int]
    UNKNOWN: ServicesDetail.Status
    id: int
    ipAddress: str
    named: str
    port: int
    rank: int
    status: ServicesDetail.Status
    type: str
    def __init__(self, status: _Optional[_Union[ServicesDetail.Status, str]] = ..., ipAddress: _Optional[str] = ..., port: _Optional[int] = ..., rank: _Optional[int] = ..., id: _Optional[int] = ..., type: _Optional[str] = ..., named: _Optional[str] = ...) -> None: ...

class ServicesDetailList(_message.Message):
    __slots__ = ["services"]
    SERVICES_FIELD_NUMBER: _ClassVar[int]
    services: _containers.RepeatedCompositeFieldContainer[ServicesDetail]
    def __init__(self, services: _Optional[_Iterable[_Union[ServicesDetail, _Mapping]]] = ...) -> None: ...

class ServicesList(_message.Message):
    __slots__ = ["services"]
    SERVICES_FIELD_NUMBER: _ClassVar[int]
    services: _containers.RepeatedCompositeFieldContainer[Service]
    def __init__(self, services: _Optional[_Iterable[_Union[Service, _Mapping]]] = ...) -> None: ...

class Timestamp(_message.Message):
    __slots__ = ["stamp"]
    STAMP_FIELD_NUMBER: _ClassVar[int]
    stamp: int
    def __init__(self, stamp: _Optional[int] = ...) -> None: ...

class UnregisterObserverRequest(_message.Message):
    __slots__ = ["id"]
    ID_FIELD_NUMBER: _ClassVar[int]
    id: int
    def __init__(self, id: _Optional[int] = ...) -> None: ...

class UpdateRankRequest(_message.Message):
    __slots__ = ["id", "newRank"]
    ID_FIELD_NUMBER: _ClassVar[int]
    NEWRANK_FIELD_NUMBER: _ClassVar[int]
    id: int
    newRank: int
    def __init__(self, id: _Optional[int] = ..., newRank: _Optional[int] = ...) -> None: ...

class UpdateUserStatusRequest(_message.Message):
    __slots__ = ["id", "newStatus"]
    ID_FIELD_NUMBER: _ClassVar[int]
    NEWSTATUS_FIELD_NUMBER: _ClassVar[int]
    id: int
    newStatus: UserStatus
    def __init__(self, id: _Optional[int] = ..., newStatus: _Optional[_Union[UserStatus, _Mapping]] = ...) -> None: ...

class UserInfo(_message.Message):
    __slots__ = ["id", "ipAddress", "port"]
    ID_FIELD_NUMBER: _ClassVar[int]
    IPADDRESS_FIELD_NUMBER: _ClassVar[int]
    PORT_FIELD_NUMBER: _ClassVar[int]
    id: int
    ipAddress: str
    port: int
    def __init__(self, id: _Optional[int] = ..., ipAddress: _Optional[str] = ..., port: _Optional[int] = ...) -> None: ...

class UserStatus(_message.Message):
    __slots__ = ["binCode"]
    class Type(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    BINCODE_FIELD_NUMBER: _ClassVar[int]
    binCode: bytes
    pickle: UserStatus.Type
    protobuf: UserStatus.Type
    def __init__(self, binCode: _Optional[bytes] = ...) -> None: ...

class UserStatusRequest(_message.Message):
    __slots__ = ["id"]
    ID_FIELD_NUMBER: _ClassVar[int]
    id: str
    def __init__(self, id: _Optional[str] = ...) -> None: ...

class UserStatusResponse(_message.Message):
    __slots__ = ["code", "userStatus"]
    class Code(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
        __slots__ = []
    CODE_FIELD_NUMBER: _ClassVar[int]
    ERROR: UserStatusResponse.Code
    OK: UserStatusResponse.Code
    USERSTATUS_FIELD_NUMBER: _ClassVar[int]
    code: UserStatusResponse.Code
    userStatus: UserStatus
    def __init__(self, code: _Optional[_Union[UserStatusResponse.Code, str]] = ..., userStatus: _Optional[_Union[UserStatus, _Mapping]] = ...) -> None: ...
